package com.cloud.service;

import com.cloud.domain.TOrder;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "CLOUD-PRODUCER")
public interface IOrderService {

    @RequestMapping("/domain/t-order/getById")
    TOrder getById(@RequestParam("id") Long id);

    @RequestMapping("/domain/t-order/save")
    boolean save(@RequestBody TOrder tOrder);

    @RequestMapping("/domain/t-order/delete")
    boolean delete(@RequestParam("id") Long id);

    @RequestMapping("/domain/t-order/update")
    boolean update(@RequestBody TOrder tOrder);

    @RequestMapping("/domain/t-order/listByPage")
    PageInfo<TOrder> listByPage(@RequestBody TOrder tOrder);

    @RequestMapping("/domain/t-order/listAll")
    List<TOrder> listAll();

}
